package com.walter.controller;

import com.walter.common.Result;
import com.walter.service.SystemService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author ：ch
 * @date ：Created in 2021/5/25
 * @description：
 * @modified By：
 * @version: 1.0
 */
@Controller
@RequestMapping("/api/file")
public class FileController {
    @Autowired
    private SystemService systemService;

    @GetMapping("backupDB")
    @ResponseBody
    @ApiOperation("备份数据库结构和数据到服务器硬盘 临时测试")
    public Result<Boolean> backupDB(){
        return Result.success(systemService.backupDB());
    }
}
